ga.core.algorithm.interactive
Class SIGA<T extends IIndividual<T>>

java.lang.Object
  extended by ga.core.algorithm.interactive.AbstractSIGA<T>
      extended by ga.core.algorithm.interactive.SIGA<T>
Type Parameters:
T - The generic type of individuals.
All Implemented Interfaces:
ISIGA<T>, EvaluationListener<T>, GA<T>

public class SIGA<T extends IIndividual<T>>
extends AbstractSIGA<T>

Steady-State simple interactive genetic algorithm.

Since:
11.08.2012
Author:
Stephan Dreyer

Field Summary
private static int CRITICAL_WHILE_ITERATIONS
           
private static java.util.logging.Logger LOGGER
           
 
Fields inherited from interface ga.core.GA
KEY_EVALUATED_INDIVIDUALS_MIN_COUNT, KEY_GENOME_MAX_LENGTH, KEY_GENOME_MIN_LENGTH, KEY_INIT_INDIVIDUAL, KEY_INIT_INDIVIDUAL_PERCENTAGE, KEY_INTERVAL_FITNESS_MAX_WIDTH, KEY_VALIDATION_SPACE
 
Constructor Summary
SIGA(IPopulation<T> population, IInteractiveFitnessEvaluator<T> evaluator, ISelector<T> selector, IMutationOp<T> mutateOperator, ICrossoverOp<T> crossoverOperator, boolean useEliteStrategy)
          Creates a new steady state SIGA.
SIGA(IPopulation<T> population, IInteractiveFitnessEvaluator<T> evaluator, ISelector<T> selector, IMutationOp<T> mutateOperator, ICrossoverOp<T> crossoverOperator, IValidator<T> validator, boolean useEliteStrategy, IGALogger<T> gaLogger)
          Creates a new steady state SIGA.
 
Method Summary
 void individualEvaluated(T ind)
          This will be notified when an evaluator has evaluated the individual.
 void newIndividualRequested()
          This will be notified when a evaluator demands a new individual for evaluation.
 void step()
          Do one step.
 
Methods inherited from class ga.core.algorithm.interactive.AbstractSIGA
checkThread, exit, getContext, getCrossoverOp, getEvaluatingIndividuals, getEvaluator, getGALogger, getGeneration, getMutationOp, getPopulation, getSelector, getValidator, incGeneration, init, isUseEliteStrategy, isValidate, setValidate, setValidator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

CRITICAL_WHILE_ITERATIONS

private static final int CRITICAL_WHILE_ITERATIONS
See Also:
Constant Field Values
Constructor Detail

SIGA

public SIGA(IPopulation<T> population,
            IInteractiveFitnessEvaluator<T> evaluator,
            ISelector<T> selector,
            IMutationOp<T> mutateOperator,
            ICrossoverOp<T> crossoverOperator,
            boolean useEliteStrategy)
Creates a new steady state SIGA.

Parameters:
population - Population for the GA.
evaluator - The automatic evaluator.
selector - The selector.
mutateOperator - The mutation operator.
crossoverOperator - The crossover operator.
useEliteStrategy - Use elite strategy or not.
Since:
11.08.2012

SIGA

public SIGA(IPopulation<T> population,
            IInteractiveFitnessEvaluator<T> evaluator,
            ISelector<T> selector,
            IMutationOp<T> mutateOperator,
            ICrossoverOp<T> crossoverOperator,
            IValidator<T> validator,
            boolean useEliteStrategy,
            IGALogger<T> gaLogger)
Creates a new steady state SIGA.

Parameters:
population - Population for the GA.
evaluator - The automatic evaluator.
selector - The selector.
mutateOperator - The mutation operator.
crossoverOperator - The crossover operator.
validator - The validator
useEliteStrategy - Use elite strategy or not.
gaLogger - The ga logger.
Since:
11.08.2012
Method Detail

step

public void step()
Description copied from interface: GA
Do one step. This could create a new generation (generation-based GA) or do one reproduction (steady state).


newIndividualRequested

public void newIndividualRequested()
Description copied from interface: EvaluationListener
This will be notified when a evaluator demands a new individual for evaluation.


individualEvaluated

public void individualEvaluated(T ind)
Description copied from interface: EvaluationListener
This will be notified when an evaluator has evaluated the individual.

Parameters:
ind - The individual that has been evaluated.